#ifndef DELAYWIDGET_H
#define DELAYWIDGET_H

#include "adaptivewidgets.h"


class DelayWidget : public AGroupBox
{
    Q_OBJECT
public:
    explicit DelayWidget(const uint8_t channel, const uint8_t &sample, const uint16_t &max, QWidget *parent = nullptr);

signals:
    void delay(uint8_t, uint16_t);
public slots:
    void set(uint16_t delay);
private slots:
    void sliderChanged(const int &value);
    void timeSpinBoxChanged(const double &value);
    void meterSpinBoxChanged(const double &value);
    void footSpinBoxChanged(const double &value);
private:
    void setBlockSignals(bool block);
private:
    const uint8_t m_channel;
    const uint8_t m_sample;
    ASlider *slider;
    ADoubleSpinBox *timeSpinBox;
    ADoubleSpinBox *meterSpinBox;
    ADoubleSpinBox *footSpinBox;
};

#endif // DELAYWIDGET_H
